<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 把数字型转换成字符串型toString
        var num =10;
        var str =num.toString();
        console.log(str);
        // 我们利用String()
        console.log(String(num));
        // 利用+拼接字符串的方法来实现转换效果
        console.log(num+'');
    </script>
</head>
<body>
    
</body>
</html>